<template>
  <div :id="id" style="width: 200px; height: 200px" ref="getRef"></div>
</template>

<script>
import { onMounted } from 'vue'
export default {
  name: 'FissionFriendsH5Video',
  props: {
    id: {
      type: String
    }
  },
  setup(props) {
    const videoObject = {
      container: `#${props.id}`, //容器的ID或className
      plug: 'hls.js', // live: true,
      video: 'https://ckplayer-video.oss-cn-shanghai.aliyuncs.com/mp4/1_1920x1080.mp4'
    }
    const state = () => new window.ckplayer(videoObject)
    onMounted(() => {
      //   initPlayer()
      state()
    })
    return {
      state
      //   play,
      //   pause
    }
  }
}
</script>

<style lang="scss" scoped></style>
